﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ProUpdate.aspx.cs" Inherits="ProUpdate"
    MasterPageFile="~/Master.master" %>

<%@ Register Assembly="DevExpress.Web.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxCallbackPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxCallback" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxPanel" TagPrefix="dx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <link href="Content/web20110913.css" rel="stylesheet" type="text/css" charset="gb2312" />
    <script type="text/javascript">
        //城区选择
        function OnDisChanged(cmbdis) {
            cmbstr.PerformCallback(cmbdis.GetValue().toString());
            cmbapp.PerformCallback(cmbdis.GetValue().toString());
            cmbcom.PerformCallback('xxx');
        }
        // 街道选择
        function OnStrChanged(cmbstr) {
            var dis = cmbstr.GetText();
            if (dis != "") {
                cmbcom.PerformCallback(cmbstr.GetValue().toString());
            }
        }

        //批文号选择
        function OnAppNumChanged(cmbappnum) {
            mark.PerformCallback(cmbappnum.GetValue().toString());
        }
        //求总资金情况
        function sumcount() {
            var num1 = city.GetText();
            var num2 = dis.GetText();
            var sum = 0;
            if (num1 != "" && num2 != "") {
                return Number(num1) + Number(num2);
            }
            else {
                return sum;
            }
        }
        function summoney() {
            var sum = sumcount();
            total.SetText(sum);
        }

    </script>
</asp:Content>
<asp:Content ID="Content2" runat="server" ContentPlaceHolderID="MainContent">
    <h1 class="DemoTitle">
        项目信息修改
    </h1>
    <div id="DemoArea">
        <div class="Spacer" style="height: 14px;">
        </div>
        <dx:ASPxCallbackPanel ID="ASPxCallbackPanel1" OnCallback="lbMark_Callback" ClientInstanceName="mark"
            runat="server">
            <PanelCollection>
                <dx:PanelContent>
                    <table border="0px" cellspacing="0" cellpadding="0" class="table10">
                        <tr>
                            <td style="width: 150px;">
                                项目名称：
                            </td>
                            <td style="width: 250px">
                                <asp:TextBox ID="txtProName" runat="server" Width="200px"></asp:TextBox>
                            </td>
                            <td style="width: 150px;">
                                项目类型：
                            </td>
                            <td style="width: 250px; text-align: left;">
                                <dx:ASPxComboBox ID="cmbType" runat="server" DataSourceID="SDSProType" TextField="Type_Name"
                                    ValueField="Type_ID" Height="22px" Width="200px" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                    CssPostfix="Office2010Blue" Spacing="0" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                    Font-Size="9pt">
                                    <ItemStyle HorizontalAlign="Left" />
                                    <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                                    </LoadingPanelImage>
                                    <LoadingPanelStyle ImageSpacing="5px">
                                    </LoadingPanelStyle>
                                    <ButtonStyle Width="13px">
                                    </ButtonStyle>
                                </dx:ASPxComboBox>
                            </td>
                        </tr>
                        <tr class="split">
                            <td colspan="4">
                                所属社区
                            </td>
                        </tr>
                        <tr>
                            <td>
                                城区：
                            </td>
                            <td style="text-align: left;">
                                <dx:ASPxComboBox ID="CmbDis" runat="server" ClientInstanceName="cmbdis" DropDownStyle="DropDown"
                                    IncrementalFilteringMode="StartsWith" EnableSynchronization="False" TextField="Community_Name"
                                    ValueField="Community_ID" Height="22px" Width="200px" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                    CssPostfix="Office2010Blue" Spacing="0" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                    Font-Size="9pt" SelectedIndex="0">
                                    <ItemStyle HorizontalAlign="Left" />
                                    <ClientSideEvents SelectedIndexChanged="function(s, e) { OnDisChanged(s); }"></ClientSideEvents>
                                    <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                                    </LoadingPanelImage>
                                    <LoadingPanelStyle ImageSpacing="5px">
                                    </LoadingPanelStyle>
                                    <ButtonStyle Width="13px">
                                    </ButtonStyle>
                                </dx:ASPxComboBox>
                            </td>
                            <td>
                                街道：
                            </td>
                            <td style="text-align: left;">
                                <dx:ASPxComboBox ID="CmbStr" runat="server" ClientInstanceName="cmbstr" DataSourceID="SDSStr"
                                    DropDownStyle="DropDown" IncrementalFilteringMode="StartsWith" EnableSynchronization="False"
                                    TextField="Community_Name" ValueField="Community_ID" ValueType="System.String"
                                    OnCallback="CmbStr_Callback" Height="22px" Width="200px" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                    CssPostfix="Office2010Blue" Spacing="0" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                    Font-Size="9pt">
                                    <ItemStyle HorizontalAlign="Left" />
                                    <ClientSideEvents SelectedIndexChanged="function(s, e) { OnStrChanged(s); }"></ClientSideEvents>
                                    <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                                    </LoadingPanelImage>
                                    <LoadingPanelStyle ImageSpacing="5px">
                                    </LoadingPanelStyle>
                                    <ButtonStyle Width="13px">
                                    </ButtonStyle>
                                </dx:ASPxComboBox>
                                <asp:SqlDataSource ID="SDSStr" runat="server" ConnectionString="<%$ ConnectionStrings:CMSConnectionString %>"
                                    SelectCommand="SELECT [Community_ID], [Community_Name] FROM [Community] WHERE ([Parent_ID] = @Parent_ID)">
                                    <SelectParameters>
                                        <asp:ControlParameter ControlID="CmbDis" Name="Parent_ID" PropertyName="Value" Type="String" />
                                    </SelectParameters>
                                </asp:SqlDataSource>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                社区：
                            </td>
                            <td style="text-align: left;">
                                <dx:ASPxComboBox ID="CmbCom" runat="server" ClientInstanceName="cmbcom" DataSourceID="SDSCom"
                                    DropDownStyle="DropDown" IncrementalFilteringMode="StartsWith" EnableSynchronization="False"
                                    TextField="Community_Name" ValueField="Community_ID" OnCallback="cmdCom_Callback"
                                    Height="22px" Width="200px" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                    CssPostfix="Office2010Blue" Spacing="0" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                    Font-Size="9pt">
                                    <ItemStyle HorizontalAlign="Left" />
                                    <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                                    </LoadingPanelImage>
                                    <LoadingPanelStyle ImageSpacing="5px">
                                    </LoadingPanelStyle>
                                    <ButtonStyle Width="13px">
                                    </ButtonStyle>
                                </dx:ASPxComboBox>
                                <asp:SqlDataSource ID="SDSCom" runat="server" ConnectionString="<%$ ConnectionStrings:CMSConnectionString %>"
                                    SelectCommand="SELECT [Community_ID], [Community_Name] FROM [Community] WHERE ([Parent_ID] = @Parent_ID)">
                                    <SelectParameters>
                                        <asp:ControlParameter ControlID="CmbStr" Name="Parent_ID" PropertyName="Value" Type="String" />
                                    </SelectParameters>
                                </asp:SqlDataSource>
                            </td>
                            <td>
                            </td>
                            <td>
                            </td>
                        </tr>
                        <tr class="split">
                            <td colspan="4">
                                项目基本信息
                            </td>
                        </tr>
                        <tr>
                            <td>
                                项目基本描述：
                            </td>
                            <td colspan="3" align="left">
                                <asp:TextBox ID="txtProBasic" runat="server" TextMode="MultiLine" Width="600px" Height="45px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                项目地址：
                            </td>
                            <td colspan="3" align="left">
                                <asp:TextBox ID="txtProAdd" runat="server" TextMode="MultiLine" Height="22px" Width="600px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                规模(面积/长度等)：
                            </td>
                            <td>
                                <asp:TextBox ID="txtProScope" runat="server" Width="200px"></asp:TextBox>
                            </td>
                            <td>
                                服务对象：
                            </td>
                            <td>
                                <asp:TextBox ID="txtServerObj" runat="server" Width="200px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                服务人次：
                            </td>
                            <td>
                                <asp:TextBox ID="txtServerPer" runat="server" Width="200px"></asp:TextBox>
                            </td>
                            <td>
                                联系方式：
                            </td>
                            <td>
                                <asp:TextBox ID="txtContact" runat="server" Width="200px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                其它：
                            </td>
                            <td colspan="3">
                                <asp:TextBox ID="txtOther" runat="server" TextMode="MultiLine" Width="600px" Height="45px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr class="split">
                            <td colspan="4">
                                项目经费情况(万元)
                            </td>
                        </tr>
                        <tr>
                            <td>
                                市级补助情况：
                            </td>
                            <td style="text-align: left">
                                <dx:ASPxTextBox ID="txtCityFund" runat="server" Width="150px" ClientInstanceName="city">
                                    <MaskSettings Mask="&lt;0..999999999&gt;.&lt;0..9999&gt;" />
                                </dx:ASPxTextBox>
                                <%--<asp:TextBox ID="txtCityFund" runat="server" Width="200px"></asp:TextBox>--%>
                            </td>
                            <td>
                                区资金配套情况：
                            </td>
                            <td style="text-align: left">
                                <dx:ASPxTextBox ID="txtDisFund" runat="server" Width="150px" ClientInstanceName="dis">
                                    <MaskSettings Mask="&lt;0..999999999&gt;.&lt;0..9999&gt;" />
                                </dx:ASPxTextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                项目总投入经费：
                            </td>
                            <td style="text-align: left">
                                <dx:ASPxTextBox ID="txtTotalFunds" runat="server" Width="150px" ReadOnly="true" ClientInstanceName="total">
                                    <ClientSideEvents GotFocus="function(s, e) { summoney(); }" />
                                </dx:ASPxTextBox>
                            </td>
                            <td>
                            </td>
                            <td>
                            </td>
                        </tr>
                        <tr class="split">
                            <td colspan="4">
                                项目批文信息
                            </td>
                        </tr>
                        <tr>
                            <td>
                                批准文号：
                            </td>
                            <td style="text-align: left;">
                                <dx:ASPxComboBox ID="cmbApprovalNum" DropDownStyle="DropDown" ClientInstanceName="cmbapp"
                                    runat="server" DataSourceID="SDSAppNum" TextField="Approal_ID" ValueField="ID"
                                    Height="22px" Width="200px" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                    CssPostfix="Office2010Blue" Spacing="0" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                    Font-Size="9pt" OnCallback="cmbApprovalNum_Callback">
                                    <ItemStyle HorizontalAlign="Left" />
                                    <ClientSideEvents SelectedIndexChanged="function(s, e) { OnAppNumChanged(s); }">
                                    </ClientSideEvents>
                                    <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                                    </LoadingPanelImage>
                                    <LoadingPanelStyle ImageSpacing="5px">
                                    </LoadingPanelStyle>
                                    <ButtonStyle Width="13px">
                                    </ButtonStyle>
                                </dx:ASPxComboBox>
                                <asp:SqlDataSource ID="SDSAppNum" runat="server"  ConnectionString="<%$ ConnectionStrings:ManagerConnectionString %>"
                                    SelectCommand="SELECT [ID],[Approal_ID], [ComminityID] FROM [Approal] WHERE ([ComminityID] = @ComminityID)">
                                    <SelectParameters>
                                        <asp:ControlParameter ControlID="CmbDis" Name="ComminityID" PropertyName="Value"
                                            Type="String" />
                                    </SelectParameters>
                                </asp:SqlDataSource>
                            </td>
                            <td>
                                批准时间：
                            </td>
                            <td>
                                <asp:TextBox ID="txtApprovalDate" runat="server" Width="200px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                批附摘要：
                            </td>
                            <td colspan="3">
                                <asp:TextBox ID="mmMark" runat="server" TextMode="MultiLine" Width="600px" Height="100px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr class="split">
                            <td colspan="4">
                                &nbsp;
                            </td>
                        </tr>
                        <tr>
                            <td>
                                项目实施单位：
                            </td>
                            <td>
                                <asp:TextBox ID="txtProDev" runat="server" Width="200px"></asp:TextBox>
                            </td>
                            <td>
                                申报时间：
                            </td>
                            <td style="text-align: left;">
                                <dx:ASPxDateEdit ID="txtReportDate" runat="server" Width="200px" AllowUserInput="False"
                                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue"
                                    Spacing="0" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                    <CalendarProperties ClearButtonText="清除" TodayButtonText="今天">
                                        <HeaderStyle Spacing="1px" />
                                    </CalendarProperties>
                                    <ButtonStyle Width="13px">
                                    </ButtonStyle>
                                </dx:ASPxDateEdit>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                操作时间：
                            </td>
                            <td>
                                <asp:TextBox ID="txtOperateDate" runat="server" Width="200px"></asp:TextBox>
                            </td>
                            <td>
                            </td>
                            <td>
                            </td>
                        </tr>
                    </table>
                    <table width="100%">
                        <tr>
                            <td align="right">
                                <dx:ASPxButton ID="btnSubmit" runat="server" Text="提交" OnClick="btnSubmit_Click"
                                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue"
                                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Height="10px">
                                </dx:ASPxButton>
                            </td>
                            <td>
                                <dx:ASPxButton ID="btnCancel" runat="server" Text="重置" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                    CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                    OnClick="btnCancel_Click" Height="10px">
                                </dx:ASPxButton>
                            </td>
                        </tr>
                    </table>
                    <div>
                    </div>
                </dx:PanelContent>
            </PanelCollection>
        </dx:ASPxCallbackPanel>
        <asp:SqlDataSource ID="SDSProType" runat="server" ConnectionString="<%$ ConnectionStrings:CMSConnectionString %>"
            SelectCommand="SELECT * FROM [TypeInfo]"></asp:SqlDataSource>
        <asp:SqlDataSource ID="SDSDis" runat="server" ConnectionString="<%$ ConnectionStrings:ManagerConnectionString %>"
            SelectCommand="SELECT Community_ID,Community_Name, Parent_ID FROM [Community] WHERE ([Community_ID] = @Community_ID)">
            <SelectParameters>
                <asp:SessionParameter Name="Community_ID" SessionField="D_ID" Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="SDSDisAll" runat="server" ConnectionString="<%$ ConnectionStrings:ManagerConnectionString %>"
            SelectCommand="SELECT Community_ID,Community_Name, Parent_ID FROM [Community] WHERE ([Parent_ID] = @Parent_ID)">
            <SelectParameters>
                <asp:Parameter DefaultValue="0" Name="Parent_ID" Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>
    </div>
</asp:Content>
